package com;

import java.io.IOException;
import java.util.List;

import android.graphics.Point;
import android.os.RemoteException;

import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;

public class guajiSwipe extends UiAutomatorTestCase {
	@SuppressWarnings("null")
	public void testDemo() throws UiObjectNotFoundException, RemoteException,
									IOException {
		Point[] points = null ;
		for(int i = 0;i<1000;i=i+2){
			points[i].x=100;
			points[i].y=920;
		}
		for(int j = 1;j<1000;j=j+2){
			points[j].x=800;
			points[j].y=920;
		}
		
		int count=0;
		while(true){
			if (count>1) {
				count=0;
				if (getUiDevice().getCurrentPackageName().equals("com.miui.home")) {
					break;
				}
			}
			UiDevice.getInstance().swipe(points,10);
		
			count++;
		}
	
	}
}
